package com.drawu.drawuspring.domain.VO;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.List;


@Data
public class CommentVO {
    // 评论信息
    @ApiModelProperty(value = "评论id")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty(value = "帖子id")
    private Integer postId;

    @ApiModelProperty(value = "评论者id")
    private Integer userId;

    @ApiModelProperty(value = "回复的评论 ID")
    private Integer repliedCommentId;

    @ApiModelProperty(value = "父评论id")
    private Integer fatherId;

    @ApiModelProperty(value = "接收者id")
    private Integer receiverId;

    @ApiModelProperty(value = "内容")
    private String content;

    @ApiModelProperty(value = "评论图片")
    private String url;

    @ApiModelProperty(value = "创建时间")
    private LocalDateTime createTime;


    private List<CommentVO> children = new ArrayList<>();

    // 用户信息
    @ApiModelProperty(value = "用户信息")
    private UserVO userVO;

}
